import type { ILoginParams, IToken } from "@/types/login";
import type { IUser } from "@/types/user";
import { http } from "@/utils/request";


/**
 * @description  请求登录
 * @param ILoginParams 账号   密码
 * @returns 
 */
export const reqLogin = (loginParams:ILoginParams)=>{
  return http<IToken>('/api/user/passport/login','POST', loginParams)
}
/**
 * @description 退出登录
 * @returns 
 */
export const reqLogout=( )=>{
  return http('/api/user/passport/logout','GET')
}
/**
 * @description 获取用户信息
 * @returns 
 */
export const reqUserInfo=()=>{
  return http<IUser>('/api/user/passport/auth/getUserInfo','GET')
}